<?php
include 'header.php';

$user = $_SESSION['user'];

$results = $snsdb->get_results("select id, acount_id, acount_name, acount_image, acount_source from sns_acount where uid=".$user->id);

?>

         <script type="text/javascript" src="js/sha1.js"></script>
         <script type="text/javascript" src="js/oauth.js"></script>
         <script type="text/javascript" src="js/addacount.js"></script>
                <div id="sider_left">
                <span id="user_id_disnone" style="display: none;"><?php echo $user->id;?></span>
                	<img src="images/b_sider_top.jpg" width="207" height="7" class="imgfloat" />
                    	<ul>
                        	<li id="xuanze">我的账号</li>
                            <li id="weixuanze"><a href="mytask.php">我的任务</a></li>
                        </ul>
                    <img src="images/b_sider_buttom.jpg" width="207" height="7" class="imgfloat" />
                </div>
                <div id="sider_right">
                	<img src="images/sider_righttop.jpg" width="642" height="6" class="imgfloat" />
                    	<span id="myzh">我的账号</span>
                        <div class="jiexi">
                        	<div class="zhanghao">
                        		<ul id="acountlist">
                        		<?php foreach ($results as $result){
                        		?>
                        			<li>
                        				<span class="acount_id_span" style="display: none;"><?php echo $result->id;?></span>
                        				<span class="acount_name_span" style="display: none;"><?php echo $result->acount_name;?></span>
                        				<span class="acount_source_span" style="display: none;"><?php if($result->acount_source == 'tencent') echo '腾讯微博'; elseif($result->acount_source == 'sina') echo '新浪微博';?></span>
                        				<img class="acount_delete_bt" src="images/delete.png" alt="" style="float: right; margin: -10px; display: none;" />
                        				<div style="height: 80px">
                        					<img class="touxiang" src="<?php echo $result->acount_image;?>" alt="" />
                        					<span ><?php echo $result->acount_name;?></span>
                        				</div>
                        				<div class="weibosign">
                        				<img src="images/<?php echo $result->acount_source;?>.png" alt="" /><?php if($result->acount_source == 'tencent') echo '腾讯微博'; elseif($result->acount_source == 'sina') echo '新浪微博';?></div>
                        			</li>
                        			<?php }?>
                        			
                        			<li id="addnewacount" style="border: 1px #CCC dashed;">
                        				<img id="addNewCo" src="images/addacount.png" alt="" style="margin: 3px;" />
                        			</li>
                        		</ul>
                        	</div>
                        	<div id="addMenu">
                        			<ul>
                        				<li id="sina"><img src="images/sina.png" alt="" />新浪微博</li>
                        				<li id="tencent"><img src="images/tencent.png" alt="" />腾讯微博</li>
                        			</ul>
                        	</div>
                        </div>
                    <img src="images/sider_rightbuttom.jpg" width="642" class="imgfloat" />
                </div>
        	<img src="images/container_buttom.gif" width="880" height="12" class="imgfloat" />
        </div>
        <div id="alert_box"></div>
    </body>
</html>